package com.uex.dev.manage.admin.vo.project;

import com.uex.dev.manage.admin.enums.WorkModeEnum;
import com.uex.dev.manage.admin.po.ProjectPO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * @author lzs
 * @create 2024/02/25
 * @description
 */
@Schema(description = "设备项目列表响应参数")
@Data
public class ProjectPageResp {
    @Schema(description = "项目Id")
    private Integer prjId;
    @Schema(description = "最终用户")
    private String prjEndCompany;
    @Schema(description = "用户对接人及联系电话")
    private String prjEndUser;
    @Schema(description = "ERP对接厂商")
    private String prjErpVendor;
    @Schema(description = "ERP对接产品及版本")
    private String prjErpProject;
    @Schema(description = "ERP对接人及联系电话")
    private String prjErpUser;
    @Schema(description = "系统工作模式")
    private WorkModeEnum prjWorkMode;
    @Schema(description = "对接文档")
    private List<ProjectDeviceFileResp> files;
    @Schema(description = "设备列表")
    private List<ProjectDeviceInfoResp> deviceList;

    public static ProjectPageResp fromPO(ProjectPO projectPO) {
        ProjectPageResp projectPageResp = new ProjectPageResp();
        BeanUtils.copyProperties(projectPO, projectPageResp);
        return projectPageResp;
    }
}